package cn.ticket.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import cn.ticket.model.Buses;
@Repository 
@Transactional
public interface BusesMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Buses record);

    int insertSelective(Buses record);

    Buses selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Buses record);

    int updateByPrimaryKey(Buses record);
    
    int getInfoCount();
    
    int seatOccupationAdd1(@Param("id")int id);
    
    int seatOccupationRemove1(@Param("id")int id);
    
    List<Buses> getAll();
    
    List<Buses> getByBusOrderId(@Param("busOrderId")int busOrderId);
    
    List<Buses> getByBusorderidAndRouteid(@Param("busOrderId")int busOrderId,@Param("routeId")Byte routeId);
    
    List<Map<String, Object>> getInfo();
    
    List<Map<String, Object>> getInfoByCount(@Param("start")int start,@Param("count")int count);
    
    List<Map<String, Object>> getInfoByBusOrderId(@Param("busOrderId")Integer busOrderIds);
}